package cn.anquing.study.qlexpress.demo;

import com.ql.util.express.DefaultContext;
import com.ql.util.express.ExpressRunner;

/**
 * 简单例子
 * @author wangquanqing
 * @since 2021/2/23 10:39
 */
public class Demo1 {

    public static void main(String[] args) throws Exception {
        ExpressRunner runner = new ExpressRunner();
        DefaultContext<String, Object> context = new DefaultContext<String, Object>();
        context.put("a",1);
        context.put("b",200);
        context.put("c",5);
        String express = "a+b/c";
        Object r = runner.execute(express, context, null, true, true);
        System.out.println(r);
    }
}
